Change the pcidevs_lock from rw_lock to spin_lock
authorKeir Fraser <keir.fraser@citrix.com>
Fri, 19 Dec 2008 14:52:32 +0000 (14:52 +0000)
committerKeir Fraser <keir.fraser@citrix.com>
Fri, 19 Dec 2008 14:52:32 +0000 (14:52 +0000)
commit8afd0f11324410d67fcf698ab873c3461de23b65
treed89c5afd1a0ea88e81f1a46c4be02cb9ece621f8
parent7784d17ecd62bf31eb46d4b44082e71898fd64c7
Change the pcidevs_lock from rw_lock to spin_lock

As pcidevs_lock is changed from protecting only the alldevs_list to
more than that, it doesn't benifit too much from the rw_lock. Also the
previous patch 18906:2941b1a97c60 is wrong to use read_lock to protect some
sensitive data (thanks Espen pointed out that).

Also two minor fix in this patch:
a) deassign_device will deadlock when try to get the pcidevs_lock if
called by pci_release_devices, remove the lock to the caller.
b) The iommu_domain_teardown should not ASSERT for the pcidevs_lock
because it just update the domain's vt-d mapping.

Signed-off-by: Yunhong Jiang <yunhong.jiang@intel.com>
xen/arch/x86/domctl.c
xen/arch/x86/irq.c
xen/arch/x86/msi.c
xen/arch/x86/physdev.c
xen/drivers/passthrough/amd/pci_amd_iommu.c
xen/drivers/passthrough/iommu.c
xen/drivers/passthrough/pci.c
xen/drivers/passthrough/vtd/iommu.c
xen/include/xen/pci.h